# Eli Sowash
# assignment
# date


class Kitty(): 
    def __init__(self, **kwargs):
        self.variables = kwargs
        
    def set_variable(self, kwarg, var):
        self.variables[kwarg] = var
        
    def get_variable(self, kwarg):
        return(self.variables.get(kwarg))
        
def main():

    print('Here are a bunch of example functions for Eli to reference')
    
    print("Here is how to open a file and trap an error condition")
    try:
        infile = open('lines.txt')
        for line in infile: print(line.strip())
    except IOError as e:
        print('Could not open file:', e)
        
    print("Here is how to call a function")
    testfunc(42)
    
    print('Here is some class demonstration, where I send in some variables')    
    Aled = Kitty(name = 'aled roy orbison pussycat', color = 'orange')
    Porthos = Kitty(name = 'porthos von pitakitty', color = 'tuxedo' )

    print(Porthos.get_variable('color'))
    print(Aled.get_variable('name')) 



def testfunc(number):
    print('This is a test function, which was passed value', number)
    
    
       
        
if __name__ == "__main__": main()